function warningDetails(json,container){
    if(!json){
        return;
    }
    if(json.status==200) {
        var htmlStr="";
        var dataMap=json.data;
        if(dataMap.headline){
            htmlStr+='<div class="title_waringDetails">'+dataMap.headline+'</div>';
        };
        htmlStr+='<div  class="subTitle_waringDetails">';
        if(dataMap.sender){
            htmlStr+='<div class="subLeft_waringDetails">'+
                        '<span class="num_waringDetails">发布单位：</span>'+
                        '<span>国突中心</span>'+
                    '</div>';
        };
        if(dataMap.sendTime){
            htmlStr+='<div class="subLeft_waringDetails">'+
                    '<span class="num_waringDetails">发布日期：</span>'+
                    '<span>'+dataMap.sendTime.substring(0,11)+'</span>'+
                '</div>'
        };
        htmlStr+='</div>';
        htmlStr+='<div class="content_waringDetails"><div class="icon_waringDetails">';
        if(dataMap.icon){
            htmlStr+='<img src="'+dataMap.icon+'">'
        };
        if(dataMap.areaDesc){
            htmlStr+='<p>'+dataMap.areaDesc+'</p>'
        };
        htmlStr+='</div>';
        if(dataMap.description){
            htmlStr+='<div class="text_waringDetails">'+
                '<span>'+dataMap.description+'</span>'+
            '</div>'
        };
        htmlStr+='</div>';
        if(dataMap.defenseMethod){
            var replaceStr="\r\n";
            htmlStr+='<div class="description_waringDetails">'+
                            '<p>'+dataMap.defenseMethod.replace(/\r\n/g,"</br>")+'</p>'+
                    '</div>';
        };

    };
    container.empty().html(htmlStr);
};

//获取Id
var searchURL=window.location.search;
searchURL = searchURL.substring(1, searchURL.length);


$.ajax({
    "url":"http://test.yulaile.cc/bootspr/weixin/oneAlert",
    type:'GET', //POST
    async:true,    //或false,是否异步
    data:{
        id:searchURL
    },
    dataType:'json',    //返回的数据格式：json/xml/html/script/jsonp/text
    success:function(data){
        warningDetails(data,$('#container_waringDetails'));
    },
    error:function(e){
        console.log(e)
    }
});